package com.jack.orderDemo;

public class User {
    private String name;

    //这里就让一个用户只有一个订单
    private Order orders;


    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", orders=" + orders +
                '}';
    }

    public Order getOrders() {
        return orders;
    }

    public void setOrders(Order orders) {
        this.orders = orders;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public User(String name, Order orders) {
        this.name = name;
        this.orders = orders;
    }

    public User(String name) {
        this.name = name;
    }
}
